04. Java Basic APIs - StringBuilder, StringBuffer, Regex
035ND C01 L01 A02 STRINGBUILDER, STRING, REGEX
The StringBuilder and StringBuffer class creates a mutable sequence of characters.
Different than String, StringBuilder and StringBuffer are mutable. Both classes create a mutable sequence of characters. And they are very much similar to each other.
However the StringBuilder provides no guarantee of synchronization whereas the StringBuffer class does. And Regex, aka, regular expression, is used to match or filter out Strings. Again, please take a look at the APIs docs on your own, and see if you can solve the quizzes and the coding problems
Resources:
StringBuilder: https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html
StringBuffer: https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html
Regex: https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
SOLUTION:
Some other outputSOLUTION:
An email addressStringBuilder, StringBuffer, Regex Coding exercise
Task Description:
Write a method with a random string input, returns a String containing only vowels.
Example:
Input: “Hello World!” -> output: “eoo”
Input: “Udacity Course” -> output: “Uaioue”
Skeleton of code
public static String vowelOnly(String input) {
}
Task Feedback:
Great job!
Solution for your reference: https://github.com/udacity/JDND/tree/master/exercises/c1/exercises
035ND C01 L01 A03 CODING EXERCISES SOLUTION